<h3>Tambah User</h3>
<?php
$this->load->helper('form');
echo form_open($form_action);
?>

<table id="tabel_form">
    <tr><td>ID User (No HP)</td><td><input type="text" name="id_user" value="<?php echo set_value('id_user', isset($id_user) ? $id_user : ''); ?>" size="30" /></td></tr>
    <tr><td>Nama User </td><td><input type="text" name="nama_user" value="<?php echo set_value('nama_user', isset($nama_user) ? $nama_user : ''); ?>" size="30" /></td></tr>
    <tr><td>Sekolah</td><td>
            <select name="id_sekolah">
                <?php
                foreach ($query->result_array() as $row) {
                    echo '<option value ="' . $row['id_sekolah'] . '">'. $row['nama_sekolah'].'</option>';
                }
                ?>
            </select></td>
    </tr>
    <tr><td>Kategori</td><td>
            <select name="id_kategori_user">
                <option value="2">Admin</option>
                <option value="3">Guru</option>
                <option value="4">Siswa</option>
            </select></td>
    </tr>
    <tr style="text-align: center"><td colspan="2"><input type="submit" name="submit" value="Tambahkan"></td></tr>    
</table>
